import { createRouter,createWebHistory } from "vue-router";
import { constantRoute } from './routes'


const router = createRouter({
  history: createWebHistory(),
  routes: constantRoute,
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { left: 0, top: 0 };
    }
   },
  linkActiveClass: "active"
})

export default router;